# coding=utf-8
def main():
	import Image
	im = Image.open(ur'bell.png')
	# RING-RING-RING
	# say it out loud
	# 'green'?
	# 收集g值
	l = []
	for y in range(im.size[1]):
		for x in range(im.size[0]):
			l.append(im.getpixel((x,y))[1])
	# many pairs ring ring
	# 搞成2元对
	pairs = [(l[i], l[i+1]) for i in range(0, len(l), 2)]
	
	# 很多元素的差值都为42
	diffs = [abs(i[0] - i[1]) for i in pairs]

	# 获得不是42的值
	d = [x for x in diffs if x != 42]
	print d

	s = ''.join([chr(x) for x in d])
	print s
	# whodunnit().split()[0] ?
	# who done it? 谁做了这个？
	# who是谁？ Python发明人？怎么联系起来的，就跟Python关系最大的人么？

	print 'Guido Van Rossum'.split()[0]

	# 下一关：http://www.pythonchallenge.com/pc/ring/guido.html

if __name__ == '__main__':
	main()

